%global sname XStatic-Magic-Search
Name:           {{ py2name('XStatic-Magic-Search') }}
Version:        0.2.5.2
Release:        0
Summary:        Magic Search %{version} (XStatic packaging standard)
License:        {{ license('Apache-2.0') }}
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/xstatic-magic-search/
Source0:        https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  {{ py3('setuptools') }}
Requires:       {{ py3('XStatic') }}
BuildArch:      noarch

%description
Magic Search JavaScript library packaged for setuptools (easy_install) / pip.

%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup

%build
#Correct permission for README.txt
chmod -x README.txt

#Remove unneeded files type from source
find . -name *~ -exec rm -rf {} \;

%{py3_build}

%install
%{py3_install}

%files
%doc README.txt
%{python3_sitelib}/xstatic
%{python3_sitelib}/XStatic_Magic_Search-%{version}-py?.?.egg-info
%{python3_sitelib}/XStatic_Magic_Search-%{version}-py?.?-nspkg.pth

%changelog
